##############################################################
## MOD Title:           Anti Bot Question Mod
## MOD Author:          MagMo < N/A > (N/A) http://phpbb.mwegner.de/
##
## MOD Update:          2.0.0 -> 2.0.1
##
## Update Level:        easy
## Update Time:         5 Minute
##
##
## Files To Edit:       4
##      posting.php
##      includes/usercp_register.php
##      templates/subSilver/posting_body.tpl
##      templates/subSilver/profile_add_body.tpl
##
## Included Files:      16
##      admin/abq_auto_quests.php
##      admin/abq_config.php
##      admin/abq_fonts.php
##      admin/abq_indi_quests.php
##      includes/functions_abq.php
##      includes/functions_abq_bild2.php
##      includes/functions_abq_bild3.php
##      includes/functions_abq_upload.php
##        language/lang_english/lang_abq.php
##        language/lang_english/lang_abq_admin.php
##        language/lang_german/lang_abq.php
##        language/lang_german/lang_abq_admin.php
##      templates/subSilver/admin/abq_config_body.tpl
##      templates/subSilver/admin/abq_indi_quests_body.tpl
##      templates/subSilver/admin/abq_indi_quests_delete_body.tpl
##      templates/subSilver/admin/abq_indi_quests_edit_body.tpl
##
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Or check: http://phpbb.mwegner.de/ for the latest version of this MOD. 
## Downloading this MOD from other sites could cause malicious code to enter 
## into your phpBB Forum.
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

##############################################################
##         UPDATE OF THE Anti Bot Question Mod              ##
##############################################################

# 
#-----[ SQL ]-------------------------------------------------
# 
# EN:
#    Run the following SQL statement to update your phpBB database.
#    You can use phpMyAdmin or a similar tool to run this update.
#
# DE:
#    Fhre folgende SQL-Anweisungen aus, um die phpBB-Datenbank zu anzupassen.
#    Dies kann mittels phpMyAdmin oder einem vergleichbaren Programm geschehen.
#

INSERT INTO `phpbb_anti_bot_quest_config` ( `config_name` , `config_value` ) VALUES ('af_malzeichen', '*');
INSERT INTO `phpbb_anti_bot_quest_config` ( `config_name` , `config_value` ) VALUES ('af_use_select', '0');

ALTER TABLE `phpbb_anti_bot_quest` 
ADD `wronganswer01` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer02` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer03` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer04` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer05` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer06` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer07` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer08` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer09` VARCHAR( 255 ) NOT NULL ,
ADD `wronganswer10` VARCHAR( 255 ) NOT NULL ;

# 
#-----[ COPY ]------------------------------------------------ 
#
# EN:
#    Copy all included Files to the right position into your Board.
#    The Structure into the "root" folder of this MOD is identically with the
#    Structure of a phpBB Board. So then you know where the Files have to be.
#
#    If you have installed more than one Template you have to upload
#    the included *.tpl files in the subSilver folder of this MOD
#    into the folders of every Template you have installed!
#
#    !!! Overwrite existing files !!!
# 
# DE:
#    Kopiere alle einzufgenden Dateien (Included Files) an die richtige Stelle in dein Forum.
#    Die Struktur des Verzeichnises "root" dieses Mods ist identisch mit der 
#    Struktur des phpBB Boards. So kannst du genau sehen wo die Dateien hin mssen.
#
#    Wenn du mehr als ein Template installiert hast, dann musst
#    du die ins subSilver-Verzeichnis einzufgenden *.tpl-Dateien 
#    in jedes Verzeichnis aller installierten Templates kopieren.
#
#    !!! Bestehende Dateien berschreiben !!!
#

copy ../../root/admin/abq_auto_quests.php to admin/abq_auto_quests.php
copy ../../root/admin/abq_config.php to admin/abq_config.php
copy ../../root/admin/abq_fonts.php to admin/abq_fonts.php
copy ../../root/admin/abq_indi_quests.php to admin/abq_indi_quests.php
copy ../../root/includes/functions_abq.php to includes/functions_abq.php
copy ../../root/includes/functions_abq_bild2.php to includes/functions_abq_bild2.php
copy ../../root/includes/functions_abq_bild3.php to includes/functions_abq_bild3.php
copy ../../root/includes/functions_abq_upload.php to includes/functions_abq_upload.php

copy ../../root/language/lang_english/lang_abq.php to language/lang_english/lang_abq.php
copy ../../root/language/lang_english/lang_abq_admin.php to language/lang_english/lang_abq_admin.php

copy ../../root/language/lang_german/lang_abq.php to language/lang_german/lang_abq.php
copy ../../root/language/lang_german/lang_abq_admin.php to language/lang_german/lang_abq_admin.php

copy ../../root/templates/subSilver/admin/abq_config_body.tpl to templates/subSilver/admin/abq_config_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_quests_body.tpl to templates/subSilver/admin/abq_indi_quests_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_quests_delete_body.tpl to templates/subSilver/admin/abq_indi_quests_delete_body.tpl
copy ../../root/templates/subSilver/admin/abq_indi_quests_edit_body.tpl to templates/subSilver/admin/abq_indi_quests_edit_body.tpl

# 
#-----[ OPEN ]------------------------------------------------ 
# 
posting.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	'L_ABQ_ANSWER_EXPLAIN' => ($abq_CaseInfo) ? '<br />'.$lang['ABQ_F_casesensitive'] : '',
	'S_ABQ_VARNAME' => $abq_config['postvariablename'], 

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_F_casesensitive'] : '',
	'S_ABQ' => $abq_answerfield, 

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$abq_quest = '';

# 
#-----[ AFTER, ADD ]------------------------------------------
# 
	$abq_answerfield = '';

# 
#-----[ FIND ]------------------------------------------------ 
# 
		'L_ABQ_ANSWER_EXPLAIN' => ($abq_CaseInfo) ? '<br />'.$lang['ABQ_F_casesensitive'] : '',
		'S_ABQ_VARNAME' => $abq_config['postvariablename'], 

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_F_casesensitive'] : '',
		'S_ABQ' => $abq_answerfield, 

# 
#-----[ OPEN ]------------------------------------------------
# 
templates/subSilver/posting_body.tpl

# 
#-----[ FIND ]------------------------------------------------
# 
	  <td class="row2"><input type="text" class="post" style="width: 200px"  name="{S_ABQ_VARNAME}" size="35" maxlength="250" value="" />
	  </td>

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	  <td class="row2">{S_ABQ}</td>

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/profile_add_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
	  <td class="row2"><input type="text" class="post" style="width: 200px"  name="{S_ABQ_VARNAME}" size="35" maxlength="250" value="" />
	  </td>

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	  <td class="row2">{S_ABQ}</td>

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM 